home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 February / Chip_2003-02_cd1.bin / zkuste / xptools / install / Xsetup / setup.exe / {app} / plugins / XQ WinNT Browser 1.xpl < prev    next >
Text File  |  2002-10-31  |  3KB  |  108 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "UIPATH"="Network\Server\Computer Browser Service"
  5. "NAME"="Browser Domain List"
  6. "VERSION"="1.01"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="010101"
  9. "TEXT 1"="Add..."
  10. "TEXT 2"="Remove"
  11. "DESCRIPTION 1"="To log on a domain in Windows, the domain must first be known to the computer browser service."
  12. "DESCRIPTION 2"="This service keeps a list from all known domains in the current network, but is normally limited to domains that are located in the same network."
  13. "DESCRIPTION 3"="For example, if you have a domain in a different location that is only connected through a dial-up line, you will not be able to log on since the computer browser service does simply not know that that domain is available."
  14. "DESCRIPTION 4"="With this setting, you can force the computer browser service to list domains that are not added by default."
  15. "DESCRIPTION 5"="Simply click add and add the NT4-style domain name (e.g. "MyOtherDomain"), or click an existing item to remove it."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com/"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"=""
  20.  
  21.  
  22. sV="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\OtherDomains"
  23. 'STR!
  24. iCount=0
  25.  
  26. Sub Plugin_Initialize 
  27.  Call InitListbox
  28. End Sub
  29.  
  30.  
  31. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  32.  if ElementIndex=1 then 'ADD
  33.     s=InputWindow("Please enter the name of domain to be added","",1)
  34.     if IsEmpty(s)=false then
  35.        if Len(s)>0 then
  36.           iCount=iCount+1
  37.           Call SetUIElement(iCount,s)
  38.           Call WriteRegistry()
  39.           Call InitListbox()              
  40.        end if
  41.     end if
  42.  
  43.  elseif ElementIndex=2 then 'REMOVE
  44.    if ElementSubIndex=0 then
  45.       Call MsgError("Please select a domain be to removed")
  46.    else
  47.       Call SetUIElement(ElementSubIndex,"")
  48.       Call WriteRegistry()
  49.       Call InitListbox()
  50.    end if
  51.  end if
  52.  
  53.  
  54. ' Call Logoff()
  55. End Sub
  56.  
  57.  
  58. Sub InitListbox
  59.  for i=1 to iCount
  60.      Call SetUIElement(i,"")
  61.  next
  62.  
  63.  iCount=0
  64.  
  65.  ary=RegReadValue(sV)
  66.  for l=lBound(ary) to ubound(ary)
  67.      s=ary(l)
  68.      s=lcase(s)
  69.      if len(s)>0 then           
  70.         iCount=iCount+1
  71.         Call SetUIElement(iCount,s)
  72.      end if
  73.  next
  74. end sub
  75.  
  76.  
  77. Sub WriteRegistry
  78.  Dim iMyCount
  79.      iMyCount=0
  80.  
  81.  for i=1 to iCount
  82.      if len(GetUIElement(i))>0 then iMyCount=iMyCount+1
  83.  next
  84.  
  85.  Dim aryLoc()
  86.  ReDim aryLoc(iMyCount-1)
  87.  
  88.  Dim iMyAryCount
  89.      iMyAryCount=0
  90.      
  91.  for i=1 to iCount
  92.      s=GetUIElement(i)
  93.      if len(s)>0 then 
  94.         aryLoc(iMyAryCount)=s
  95.         iMyAryCount=iMyAryCount+1
  96.      end if
  97.  next
  98.  
  99.  Call RegWriteValue(sV,aryLoc,5)
  100. End Sub
  101.  
  102.  
  103. Sub Plugin_Terminate 
  104. End Sub
  105.  
  106.  
  107.  
  108.